﻿//Write a method GetMax() with two parameters that returns the bigger of two integers.
//Write a program that reads 3 integers from the console and prints the biggest of them using the method GetMax().


using System;

public class GetMaxMethod
{
    public static void Main()
    {
        Console.WriteLine("Enter three integers");
        int firstInteger = int.Parse(Console.ReadLine());
        int secondInteger = int.Parse(Console.ReadLine());
        int thirdInteger = int.Parse(Console.ReadLine());
        int biggestInteger = GetMax(firstInteger, secondInteger);
        biggestInteger = GetMax(biggestInteger, thirdInteger);
        Console.WriteLine("Biggest integer is {0}!", biggestInteger);
       
    }

    private static int GetMax(int firstInt, int secondInt)
    {
        if (firstInt < secondInt)
        {
            return secondInt;   
        }
        return firstInt;
    }
}